
<!-- BEGIN:main -->

<script language="javascript" type="text/javascript">
    function submitBep(action)
    {

    if(action=='cancel'){
        window.history.back(2);
    }else{
        
         var BEP_ID = $('#BEP_ID');
         var BEP_TEN_BEP = $('#BEP_TEN_BEP');
         var BEP_IS_THUE = $('#BEP_IS_THUE');
         
         var arrayInput = new Array(BEP_TEN_BEP);
        var hasError = validateEmptyValue(arrayInput);
        if (hasError) {
            alert('Vui lòng điền đầy đủ dữ liệu');
        } else {
        var dataString = 'hdAction=' + action;
        dataString += '&BEP_ID=' + BEP_ID.val();
        dataString += '&BEP_TEN_BEP=' + BEP_TEN_BEP.val();
        dataString += '&BEP_IS_THUE=' + BEP_IS_THUE.val();
       alert(dataString);
        $.ajax({
            url: '.?com=com_bep&task=edit',
            type: "POST",
            data: dataString,
            cache: false,
            success: function(data) {
                if (data.trim() == 'OK') {
                    alert('Cập nhật thành công');
//                    window.location.reload();
                    window.location.href='.?com=com_bep';
                }
            }
        });
        
            }
    }
       


    }
</script> 


<!--biến giá trị hành động-->

<!-- BEGIN:bep -->
<div data-role="content">
   
        <h2><div class="header icon-48-article-edit">
                        Bếp: <small><small>[ Sửa ]</small></small>
                    </div></h2>

        <form method="post" name="phpForm" id="phpForm" action="" class="ui-body ui-body-c ui-corner-all">
            
            
            <input type="hidden" name="BEP_ID" id="BEP_ID" value="{BEP_ID}"/>
            <input type="hidden" name="hdAction" id="hdAction" />
            <div data-role="fieldcontain" >
                <label for="name-c" style=" width:150px;display: inline-block; ">Tên bếp:</label>
                <input type="text" name="BEP_TEN_BEP" id="BEP_TEN_BEP" value="{BEP_TEN_BEP}"  />
            </div>

            <div data-role="fieldcontain">
                <label for="slider-flip-m" style=" width:150px;display: inline-block; ">Thuế:</label>
            <select name="BEP_IS_THUE" id="BEP_IS_THUE" data-role="slider" data-mini="true">
                {BEP_IS_THUE}
            </select>
            </div>
           

      
            <div class="ui-body ui-body-b">
                <fieldset class="ui-grid-a">
                    <div class="ui-block-a">
                        <a href="javascript:void()" onclick="submitBep('cancel');" data-role="button"  data-theme="c">
                            Cancel</a>
                    </div>
                    <div class="ui-block-b">
                        <a href="javascript:void()" onclick="submitBep('edit');" data-role="button"  data-theme="b">
                            Lưu</a>
                    </div>
                    
                </fieldset>
            </div>
        </form>

  




</div>
  <!-- END:bep -->
<div data-role="footer" data-theme="b" data-position="fixed">
    <div class="ui-bar">
        <a href="./?com=com_bep" data-role="button" data-icon="refresh" data-theme="b" style="float:left;">Trở lại</a>
        <!--<a href="javascript:void()" onclick="submitForm11('remove');" data-role="button" data-icon="delete" data-theme="b" style="float:right;" class="returnTopAction">Xóa</a>-->             
    </div>
</div>   



<!-- END:main -->
